﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _019
{
    abstract class Shape
    {
        public abstract int area();
    }
    class Rectangle : Shape
    {
        private int width, height;
        public Rectangle(int w,int h)
        {
            width = w;
            height = h;
        }
        public override int area()
        {
            return (width * height);
        }
    }
    internal class Program
    {
        static void Main(string[] args)
        {
            Rectangle r = new Rectangle(12, 15);
            double a = r.area();
            Console.WriteLine("长方形的面积为：{0}", a);
            Console.ReadKey();

        }
    }
}
